bitkeeper revision 1.60 (3e4ffc20MbjIucCcaw9sFYEAAu-yeA)
authorkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>
Sun, 16 Feb 2003 21:01:20 +0000 (21:01 +0000)
committerkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>
Sun, 16 Feb 2003 21:01:20 +0000 (21:01 +0000)
Cleanups. Fixed domain building some more.

xen-2.4.16/arch/i386/traps.c
xen-2.4.16/common/domain.c
xen-2.4.16/common/network.c

index 1505907b19be30afe84ecaf304ddf373b1d60f14..f7d18610a074d1cf938b03434a3d2a6fdc3869e1 100644 (file)
@@ -297,12 +297,6 @@ asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
         ti = current->thread.traps + (error_code>>3);
         if ( ti->dpl >= (regs->xcs & 3) )
         {
-            /* XXX Kill next conditional soon :-) XXX */
-            if ( (error_code>>3)==0x80 ) 
-            { 
-                printk("DIDN'T USE FAST-TRAP HANDLER FOR 0x80!!! :-(\n");
-                BUG(); 
-            }
             gtb->flags = GTBF_TRAP_NOCODE;
             gtb->cs    = ti->cs;
             gtb->eip   = ti->address;
index 311f7cc2198c9495de542586408b74ec5dcf5956..428927a28d096614b7a4fd773515fa2f934339ac 100644 (file)
@@ -321,7 +321,7 @@ int final_setup_guestos(struct task_struct * p, dom_meminfo_t * meminfo)
     __asm__ __volatile__ ( 
         "mov %%eax,%%cr3" : : "a" (pagetable_val(p->mm.pagetable)));
 
-    memset(virt_startinfo_addr, 0, sizeof(virt_startinfo_addr));
+    memset(virt_startinfo_addr, 0, sizeof(*virt_startinfo_addr));
     virt_startinfo_addr->nr_pages = p->tot_pages;
     virt_startinfo_addr->shared_info = (shared_info_t *)meminfo->virt_shinfo_addr;
     virt_startinfo_addr->pt_base = meminfo->virt_load_addr + 
index 687d3e2403a5a86304a83391341f104446ad34d9..608ca57037d0eabd2617b06414b9336c50cb48a4 100644 (file)
@@ -347,20 +347,20 @@ int __net_get_target_vif(u8 *data, unsigned int len, int src_vif)
     int target = VIF_DROP;
     u8 *h_raw, *nh_raw;
     
-    if ( len < 2 ) goto drop;
+    if ( len < ETH_HLEN ) goto drop;
 
     nh_raw = data + ETH_HLEN;
     switch ( ntohs(*(unsigned short *)(data + 12)) )
     {
     case ETH_P_ARP:
-        if ( len < 28 ) goto drop;
+        if ( len < (ETH_HLEN + 28) ) goto drop;
         target = net_find_rule((u8)ETH_P_ARP, 0, ntohl(*(u32 *)(nh_raw + 14)),
                                ntohl(*(u32 *)(nh_raw + 24)), 0, 0, 
                                src_vif);
         break;
 
     case ETH_P_IP:
-        if ( len < 20 ) goto drop;
+        if ( len < (ETH_HLEN + 20) ) goto drop;
         h_raw =  data + ((*(unsigned char *)(nh_raw)) & 0x0f) * 4;
         
         /* XXX For now, we ignore ports. */